package net._7colorlotus;

import net._7colorlotus.model.Car;
import net._7colorlotus.model.CarDto;
import net._7colorlotus.model.CarType;
import net._7colorlotus.util.CarMapper;
import org.junit.Test;

import static org.junit.Assert.*;

public class MapstructTest {
    @Test
    public void shouldMapCarToDto() {
        //given
        Car car = new Car( "Morris", 5 );

        //when
        CarDto carDto = CarMapper.INSTANCE.car2CarDto( car );

        //then
        assertNotNull(carDto);
        assertEquals(carDto.getMake(), "Morris");
        assertEquals(carDto.getSeatCount(), 5);
    }
}
